home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual 76 / DVD Actual 1 Marzo 2003.iso / Trial / TurboCAD 7.1 Pro / Data.Cab / F25960_ToolReg.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-11-10  |  1.8 KB  |  66 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   " External Objects"
  5.    ClientHeight    =   3105
  6.    ClientLeft      =   2370
  7.    ClientTop       =   3705
  8.    ClientWidth     =   3030
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   3105
  14.    ScaleWidth      =   3030
  15.    Begin VB.CommandButton CmdOk 
  16.       Caption         =   "Ok"
  17.       Height          =   372
  18.       Left            =   840
  19.       TabIndex        =   1
  20.       Top             =   2520
  21.       Width           =   1212
  22.    End
  23.    Begin VB.ListBox List1 
  24.       Height          =   1815
  25.       Left            =   240
  26.       TabIndex        =   0
  27.       Top             =   360
  28.       Width           =   2415
  29.    End
  30. Attribute VB_Name = "Form1"
  31. Attribute VB_GlobalNameSpace = False
  32. Attribute VB_Creatable = False
  33. Attribute VB_PredeclaredId = True
  34. Attribute VB_Exposed = False
  35. Option Explicit
  36. Const gkGroup = 7
  37. Private Num As Long
  38. Private Sub CmdOk_Click()
  39.     Dim Gr As Object
  40.         If Form1.List1.Text = "Gear.Bearing" Then
  41.             Set Gr = Grs.Add(gkGroup, Num)
  42.         Else
  43.             Set Gr = Grs.Add(gkGraphic, Num)
  44.         End If
  45.         Gr.Draw
  46. End Sub
  47. Private Sub List1_Click()
  48.     Dim Gr As Object
  49.     Dim Str1$
  50.     Str1 = Form1.List1.Text
  51.     Num = Form1.List1.ItemData(Form1.List1.ListIndex)
  52.     Num = Num + 1
  53. End Sub
  54. Private Sub List1_KeyPress(KeyAscii As Integer)
  55.     Dim Num As Long
  56.     Dim Str1$
  57.     If KeyAscii = 13 And List1.ListIndex >= 0 Then
  58.         Str1 = Form1.List1.Text
  59.         Num = Form1.List1.ItemData(Form1.List1.ListIndex)
  60.         Num = Num + 1
  61.     End If
  62.     If KeyAscii = 27 Then
  63.         Me.Hide
  64.     End If
  65. End Sub
  66.